Optimal. Leaf size=21 \[ \frac {\cos (a+b x)}{b}+\frac {\sec (a+b x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2670, 14}
\begin {gather*} \frac {\cos (a+b x)}{b}+\frac {\sec (a+b x)}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2670
Rubi steps
\begin {align*} \int \sin (a+b x) \tan ^2(a+b x) \, dx &=-\frac {\text {Subst}\left (\int \frac {1-x^2}{x^2} \, dx,x,\cos (a+b x)\right )}{b}\\ &=-\frac {\text {Subst}\left (\int \left (-1+\frac {1}{x^2}\right ) \, dx,x,\cos (a+b x)\right )}{b}\\ &=\frac {\cos (a+b x)}{b}+\frac {\sec (a+b x)}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 21, normalized size = 1.00 \begin {gather*} \frac {\cos (a+b x)}{b}+\frac {\sec (a+b x)}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 40, normalized size = 1.90
method | result | size |
norman | \(-\frac {4}{b \left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right ) \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )}\) | \(36\) |
derivativedivides | \(\frac {\frac {\sin ^{4}\left (b x +a \right )}{\cos \left (b x +a \right )}+\left (2+\sin ^{2}\left (b x +a \right )\right ) \cos \left (b x +a \right )}{b}\) | \(40\) |
default | \(\frac {\frac {\sin ^{4}\left (b x +a \right )}{\cos \left (b x +a \right )}+\left (2+\sin ^{2}\left (b x +a \right )\right ) \cos \left (b x +a \right )}{b}\) | \(40\) |
risch | \(\frac {{\mathrm e}^{i \left (b x +a \right )}}{2 b}+\frac {{\mathrm e}^{-i \left (b x +a \right )}}{2 b}+\frac {2 \,{\mathrm e}^{i \left (b x +a \right )}}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}\) | \(57\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 19, normalized size = 0.90 \begin {gather*} \frac {\frac {1}{\cos \left (b x + a\right )} + \cos \left (b x + a\right )}{b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 22, normalized size = 1.05 \begin {gather*} \frac {\cos \left (b x + a\right )^{2} + 1}{b \cos \left (b x + a\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 5.70, size = 23, normalized size = 1.10 \begin {gather*} \frac {\cos \left (b x + a\right )}{b} + \frac {1}{b \cos \left (b x + a\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.49, size = 20, normalized size = 0.95 \begin {gather*} -\frac {4}{b\,\left ({\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^4-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________